extends ../layout

block main
	ul.breadcrumb
		li
			i.icon-home
		li
			i.icon-angle-right
		li
			a(href="/") 面板
		li
			i.icon-angle-right
		li
			a(href="/notifications") 通知

	div(class="row-fluid sortable")
		div(class="box span12")
			div(class="box-header", data-original-title)
				h2
					i(class="halflings-icon user")
					span.break
					| 通知
			div.box-content
				if notification.isNew()
					- var action = "/notifications?game=" + game
				else
					- var action = "/notifications/" + notification.id + "?game=" + game
				form(class="form-horizontal", action="#{action}", method="post")
					fieldset
						div.control-group
							label(class="control-label", for="content") 内容
							div.controls
								textarea(class="input-xxlarge focused", name="content", cols='50', rows='10') #{notification.get('content')}
								<p class="help-block"></p>
								
						div.control-group
							label(class="control-label", for="action") 动作
							div.controls
								select(id="action", name="action")
									option(selected=notification.get('action') == 0, value=0) 继续运行
									option(selected=notification.get('action') == 1, value=1) 重新启动
								<p class="help-block"></p>

						div.control-group
							label(class="control-label", for="deadline") 期限
							div.controls
								input(class="input-xlarge focused", id="deadline", name="deadline", type="datetime", value="#{notification.get('deadline')}")
								<p class="help-block"></p>
								
						div.form-actions
							button(type="submit", class="btn btn-primary") 保存
							button.btn 
								a(href="/notifications?game=" + game) 取消
